//
//  FrameTool.m
//  HuiYun
//
//  Created by 刘锦锋 on 16/6/9.
//  Copyright © 2016年 hpx. All rights reserved.
//

#import "FrameTool.h"

@implementation FrameTool

static float wScale;
static float hScale;

+ (void)initialize
{
    if (self == [FrameTool class])
    {
        wScale = appw/375;
        hScale = apph/667;
    }
}

+ (CGRect)getToolFrame:(CGRect)frame
{
    return CGRectMake(frame.origin.x*wScale, frame.origin.y*hScale, frame.size.width*wScale, frame.size.width*hScale);
}

+ (CGPoint)getToolPoint:(CGPoint)point
{
    return CGPointMake(point.x*wScale, point.y*hScale);
}

+ (CGFloat)getToolWidth:(CGFloat)width
{
    return width*wScale;
}

+ (CGFloat)getToolHeight:(CGFloat)height
{
    return height*hScale;
}

+ (CGFloat)getToolX:(CGFloat)x
{
    return x*wScale;
}

+ (CGFloat)getToolY:(CGFloat)y
{
    return y*hScale;
}

@end
